package example.op.image;


import com.sun.jna.platform.win32.COM.util.ObjectFactory;
import op.OpInit;
import op.OpSoft;

import java.util.logging.Logger;

/**
 * 截图功能测试
 * @author wyl
 * @version 1.0
 * @date 2025/8/9 11:34
 */
public class ImageExp001 {
    private static Logger logger = Logger.getLogger(ImageExp001.class.getName());
    public static void main(String[] args) {
        // 初始化OP插件
        OpInit.init("D:\\op\\tools.dll", "D:\\op\\op_x64.dll");

        ObjectFactory objectFactory = new ObjectFactory();
        OpSoft opSoft = objectFactory.createObject(OpSoft.class);

        int result = opSoft.capture(0,0,1920,1080,"D:\\op\\capture.png");
        logger.info("截图结果: " + (result == 1 ? "成功" : "失败"));
    }
}
